package com.abvnet.project.water.api.web;

import com.abvnet.framework.web.controller.BaseController;
import com.abvnet.framework.web.domain.AjaxResult;
import com.abvnet.project.system.config.service.IConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/contact")
public class ApiProjectContactController extends BaseController {

    @Autowired
    private IConfigService configService;

    @GetMapping("/get")
    public AjaxResult get() {
        AjaxResult ar = AjaxResult.success();
        String telphone = configService.selectConfigByKey("company.telphone");
        String website = configService.selectConfigByKey("company.site");
        ar.put("telphone", telphone);
        ar.put("website",website);
        return ar;
    }
}
